#ifndef  BFCPP_TEST_OPENANDCLOSELIMITORDER_H
#define BFCPP_TEST_OPENANDCLOSELIMITORDER_H

#include "GwCommon.hpp"
#include <atomic>


/// <summary>
/// A basic example of opening a LIMIT BUY order, waiting 8 seconds then either cancelling/closing.
/// If the order is NEW it is cancelled.
/// If the order is FILLED then a SELL is created.
/// </summary>
/// <param name="access"></param>
class MdGateway : public GatewayBase
{

public:

	MdGateway(const ApiAccess access) : GatewayBase(access), m_market{access}
	{
		m_symbol = "BTCUSDT";
	}

	void handleMarkPrice(std::any data);

	virtual void run() override;

private:

private:
	string m_symbol;
	string m_markPriceString;

	std::mutex m_mutex;
	std::condition_variable m_priceSet;
	
	UsdFuturesMarket m_market;

};

#endif 
